 
project(LSDyna)

SET(LSDyna_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})

CONFIGURE_FILE (${LSDyna_SOURCE_DIR}/LSDynaExport.h.in
                ${LSDyna_BINARY_DIR}/LSDynaExport.h)

# Do full dependency headers.
INCLUDE_REGULAR_EXPRESSION("^LSDyna.*$")
 
SET(LSDyna_SOURCES
  LSDynaFamily.h
  LSDynaMetaData.h
  LSDynaFamily.cxx
  LSDynaMetaData.cxx
)

INCLUDE_DIRECTORIES (${LSDyna_SOURCE_DIR} ${LSDyna_BINARY_DIR})

VTK_ADD_LIBRARY(LSDyna ${LSDyna_SOURCES})
TARGET_LINK_LIBRARIES(LSDyna vtksys)

# Apply user-defined properties to the library target. Such as SO Version
IF(VTK_LIBRARY_PROPERTIES)
  SET_TARGET_PROPERTIES(LSDyna PROPERTIES ${VTK_LIBRARY_PROPERTIES})
ENDIF(VTK_LIBRARY_PROPERTIES)

IF(NOT VTK_INSTALL_NO_LIBRARIES)
  INSTALL(TARGETS LSDyna
    EXPORT ${VTK_INSTALL_EXPORT_NAME}
    RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeLibraries
    LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries
    ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)

IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
  INSTALL(FILES
    ${LSDyna_SOURCE_DIR}/LSDynaFamily.h
    ${LSDyna_SOURCE_DIR}/LSDynaMetaData.h
    ${LSDyna_BINARY_DIR}/LSDynaExport.h
    DESTINATION ${VTK_INSTALL_INCLUDE_DIR_CM24}/LSDyna
    COMPONENT Development)
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
